﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 练习7
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("请输入一个字符串");
            string Input = Console.ReadLine();
            int CapitalCount = 0;
            int SmallCount = 0;
            foreach (var item in Input)
            {
                if (item>='A' && item<='Z')
                {
                    CapitalCount++;
                }
                if (item>='a' && item<='z')
                {
                    SmallCount++;
                }
            }
            Console.WriteLine("大写字母有{0}个，小写字母有{1}个", CapitalCount, SmallCount);
            Console.ReadKey();
        }
    }
}
